<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title></title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="description" content="Description">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
  <!-- <link rel="stylesheet" href="./docsify/lib/themes/vue.css"> -->
  <link rel="stylesheet" href="./docsify/docsify-darklight-theme/style.min.css"
    title="docsify-darklight-theme" type="text/css" />
  <link rel="stylesheet" href="./docsify/docsify-sidebar-collapse/sidebar.min.css" />
  <link rel="stylesheet" href="./docsify/docsify-toc/toc.css">
  <style>
    .markdown-section pre>code{
      padding: 1.2em 5px;
    }
    .docsify-copy-code-button:focus, pre:hover .docsify-copy-code-button {
      opacity: 0.85;
    }
    #docsify-darklight-theme {
      position: fixed !important;
      right: 25px !important;
      z-index: 1000;
    }
    .sidebar li {
      margin: 2px 2px 2px 0px;
    }
    /* .app-sub-sidebar {
      width: 160px;
      position: fixed;
      top: 60px;
      right: 50px;
      background: #8883;
      max-height: calc(100vh - 75px);
      overflow-y: auto;
    } */
    .zoom-overlay-open .zoom-overlay {
      opacity: 0.1 !important;
    }
    .results-panel {
      position: fixed;
      top: 5px;
      left: 300px;
      background: var(--background);
      width: 300px;
      border: 1px solid;
      padding: 10px;
      max-height: calc(100vh - 10px);
      overflow-y: auto;
      opacity: 0.9;
      scrollbar-width: thin;
    }
    .sidebar-nav {
      height: calc(100vh - 70px);
      overflow-y: auto;
      scrollbar-width: thin;
    }
  </style>
</head>
<body>
  <div id="app"></div>
  <script>
    window.$docsify = {
      name: '',
      repo: '',
      // 侧边栏支持，默认加载的是项目根目录下的_sidebar.md文件
      loadSidebar: 'SUMMARY.md',
      alias: {
        '/.*/SUMMARY.md': '/SUMMARY.md',
      },
      // 导航栏支持，默认加载的是项目根目录下的_navbar.md文件
      loadNavbar: false,
      // 封面支持，默认加载的是项目根目录下的_coverpage.md文件
      coverpage: false,
      auto2top: true,
      autoHeader: false,
      // 最大支持渲染的标题层级
      maxLevel: 6,
      // 自定义侧边栏后默认不会再生成目录，设置生成目录的最大层级（建议配置为2-4）
      subMaxLevel: 0,
      // 小屏设备下合并导航栏到侧边栏
      mergeNavbar: true,
      autoHeaders: {
        separator: 'decimal',
        levels: '6',
        scope: '#main',
        debug: true
      },
      darklightTheme: {
          defaultTheme : 'light | dark',
          dark: {
              //<your_css_variable> : <value>
              toogleImage : 'url(./icons/sun.svg)'
          },
          light: {
              //<your_css_variable> : <value>
              toogleImage : 'url(./icons/moon.svg)'
          }

      },
      markdown: {
        renderer: {
          image(href, title, text) {
            //解决图片链接处理不正确的问题
            var picHref = href;
            if(!!href && (!href.startsWith('http://') && !href.startsWith('https://')
              && !href.startsWith('/'))){
              var hash = location.hash;
              if(!!hash && hash.startsWith("#")){
                var mdPath = hash.substring(1);
                if(mdPath.indexOf('?') > -1){
                  mdPath = mdPath.substring(0,mdPath.indexOf('?'));
                }
                if(mdPath){
                  var pathSeg = mdPath.split('/');
                  if(pathSeg.length > 0){
                    pathSeg.pop();
                  }
                  picHref = '.' + pathSeg.join('/') + '/' + picHref;
                }
              }
            }
            return '<img src="'+picHref+'" data-origin="'+picHref+'" alt="'+text+'" data-action="zoom" />'
          }
        }
      },
      /*搜索相关设置*/
      search: {
          maxAge: 0,// 过期时间，单位毫秒，默认一天
          paths: 'auto',// 注意：仅适用于 paths: 'auto' 模式
          placeholder: '搜索',
          noData: '找不到结果',
          depth: 10,
          hideOtherSidebarContent: false,
          namespace: ''
      },
      pagination: {
        previousText: '上一章节',
        nextText: '下一章节',
        crossChapter: true,
        crossChapterText: true,
      },
      copyCode: {
        buttonText: '点击复制',
        errorText: '错误',
        successText: '已复制',
      },
      toc: {
        scope: '.markdown-section',
        headings: 'h1, h2, h3, h4, h5, h6',
        title: '目录',
      },
    };
  </script>
  <!-- Docsify v4 -->
  <script src="./docsify/lib/docsify.js"></script>
  <script src="./docsify/docsify-darklight-theme/index.min.js"></script>
  <script src="./docsify/lib/plugins/search.min.js"></script>
  <!-- emoji表情支持 -->
  <script src="./docsify/lib/plugins/emoji.min.js"></script>
  <!-- 图片放大缩小支持 -->
  <script src="./docsify/lib/plugins/zoom-image.min.js"></script>
  <!--在所有的代码块上添加一个简单的Click to copy按钮来允许用户从你的文档中轻易地复制代码-->
  <script src="./docsify/docsify-copy-code/docsify-copy-code.min.js"></script>
  <script src="./docsify/docsify-pagination/docsify-pagination.min.js"></script>
  <!-- 代码高亮插件 -->
  <script src="./docsify/prismjs/prism-java.min.js"></script>
  <script src="./docsify/prismjs/prism-sql.min.js"></script>
  <script src="./docsify/prismjs/prism-bash.min.js"></script>
  <script src="./docsify/prismjs/prism-json.min.js"></script>
  <script src="./docsify/docsify-autoheaders/docsify-autoHeaders.min.js"></script>
  <script src="./docsify/docsify-toc/toc.js"></script>
  <script>
    (function(){
      function activeAutoHeaders(hook, vm){
        //所有文档头部添加按多级数字编号显示标题
        hook.beforeEach(function (markdown) {
          markdown = '@autoHeader:1\n' + markdown
          return markdown;
        });
      }
      $docsify = $docsify || {};
      $docsify.plugins = [].concat(activeAutoHeaders, $docsify.plugins || []);
    })();
  </script>
  <!-- <script src="//unpkg.com/docsify-sidebar-collapse@1.3.5/dist/docsify-sidebar-collapse.min.js"></script> -->
</body>
</html>
